//
//  CommentType.m
//  YaoHeAPP
//
//  Created by mac on 15/12/30.
//  Copyright © 2015年 mac. All rights reserved.
//

#import "CommentType.h"

@implementation CommentType
-(id)initWithDic:(NSDictionary*)dic
{
    self=[super init];
    if (self) {
        self.typeMsg=dic[@"text"];
        self.value=dic[@"value"];
//        self.typeMsg=[self withDic:dic Key:@"text"];
//        self.value=[self withDic:dic Key:@"value"];
    }
    return self;
}

-(NSString*)withDic:(NSDictionary*)dic Key:(NSString*)key
{
    NSString*string;
    if ([[dic allKeys]containsObject:key]) {
        string=dic[key];
    }
    else{
        string=@"";
    }
    return string;
}


@end
